<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/templates/TemplateClient.xhtml">

	<ui:define name="titre">Fun With Videos</ui:define>
	<ui:define name="content">

		<h:head></h:head>
		<h:body>
			<h:form>

			 <p:growl id="growl" showDetail="true"/>

				<p:panel columns="2" border="0" id="pnl" header="#{mbCatalogue.selectedVideo.nom}"	toggleable="false"
					closable="false" toggleSpeed="500" closeSpeed="500" widgetVar="panel">
					
		         	<p:ajax event="close" listener="#{mbCatalogue.handleClose}" update="growl" />
					<p:ajax event="toggle" listener="#{mbCatalogue.handleToggle}" update="growl" />
						
					<h:panelGrid columns="2" border="0" style="width:60%">
					  
						<p:graphicImage value="resources/images/#{mbCatalogue.selectedVideo.affiche}.jpg" />
						<h:outputText value="Description du film..." />
				        <h:outputText value="Durée: #{mbCatalogue.selectedVideo.duree} min" />
				        <h:outputText value="" />
				        <h:outputText value="Disponibilité:" />
				        <h:outputText value="" />
				        <h:outputText value="#{mbCatalogue.selectedVideo.dateMiseAdispo}"><f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
				        </h:outputText>
				        <h:outputText value="" />
				        <h:outputText value="#{mbCatalogue.selectedVideo.dateFinMiseADispo}"><f:convertDateTime type="date" pattern="dd-MM-yyyy"/>
				        </h:outputText>
				        <h:outputText value="" />
				        <h:outputText value="Tarif: #{mbCatalogue.selectedTarif.prix} eur" />
				        <h:outputText value="" />
				        <h:commandButton value="Ajouter au panier" action="#{mbPanier.ajouterPanier}" >
						<f:setPropertyActionListener value="#{mbCatalogue.selectedVideo}" target="#{mbPanier.selectedVideo}" />
						</h:commandButton>
						<h:outputText value="" />
			        </h:panelGrid>
			        
					<a href="AccueilClient.jsf" >Retour au Catalogue Client</a>
					

				</p:panel>
				
			</h:form>
		</h:body>
	</ui:define>
</ui:composition>
